﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            String name = this.textBox1.Text; // 获取输入的值
            String password = this.textBox2.Text;
            if (name.Equals("123") && password.Equals("123")) // 判断账号密码是否等于123
            {
                MessageBox.Show("登录成功");
            }
            else
            {
                MessageBox.Show("登录失败！");
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.textBox1.Text = "";
            this.textBox2.Text = "";
            this.textBox1.Focus();
            this.textBox2.Focus();
        }
    }
}
